#pragma once
ref class LightBase abstract
{
internal:
	LightBase(void);

	virtual void Initialize(ID3D11PixelShader* pixelShader, ID3D11Buffer* lightParametersBuffer, ID3D11Buffer* detailsBuffer) = 0;

	void LightColor(float r, float g, float b);
	DirectX::XMFLOAT3 LightColor(void);
	
	void Falloff(float falloff);
	float Falloff(void);

	virtual float GetDepthForSorting(const DirectX::XMFLOAT4X4& viewMatrix) = 0;

	void LightBaseUpdateRequired(void) { m_lightBaseUpdateRequired = true; }

	virtual void Render(ID3D11DeviceContext* context, UINT indexCount = 6, UINT startIndexLocation = 0, UINT baseVertexLocation = 0) = 0;

protected private:
	virtual void SetBuffersForRendering(ID3D11DeviceContext* context);

	DirectX::XMFLOAT4							m_lightColorAndFalloff;
	Microsoft::WRL::ComPtr<ID3D11Buffer>		m_lightParametersBuffer;
	Microsoft::WRL::ComPtr<ID3D11PixelShader>	m_pixelShader;

private:
	bool										m_lightBaseUpdateRequired;
};

